# built in python 3.5.2
# author=='hashaki'

import gym
from gym import spaces
env=gym.make('CartPole-v0')
print(env.action_space)             # 行动空间
print(env.observation_space)        # 观察空间
print(env.observation_space.high)
print(env.observation_space.low)

space=spaces.Discrete(8)
x=space.sample()
assert space.contains(x)
assert space.n==8